import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import application.model.Fox;
import application.model.Location;
import application.model.Rabbit;
import application.model.Simulator;
import application.view.Field;


public class JUnitTest {
	private Simulator simulator;
	private Field field;
	private Location loc;
	private Rabbit rabbit;
	private Rabbit rabbit2;
	private Location loc2;
	private Fox fox1;

	@Before
	public void setUp() {
		simulator = new Simulator();
		 field = new Field(3,3);
		 loc = new Location(1,1);
		 loc2 = new Location(2,2);
		 rabbit = new Rabbit(true, field, loc);
		 rabbit2 = new Rabbit(true, field, loc2);
		 fox1 = new Fox(false, field, loc2);
	}
	
	@Test
	public void testSimulator() {
		simulator = new Simulator();
	}


	@Test
	public void testFoxAge() {
		fox1.setAge(2);
		assertEquals(2,fox1.getAge());
	}

	@Test
	public void testSimulate() {
		simulator.simulate(25);
	}

	@Test
	public void testSimulateKleinVeld() {
		simulator = new Simulator(3,3);
		simulator.simulate(20);
	}

	@Test
	public void testAnimalsCopy() {
		Rabbit r = rabbit;
		assertSame(r,rabbit);
		
		Fox f = new Fox(true,field,loc2);
		assertNotSame(f,fox1);
	}
	
	@Test
	public void testTwoRabbits() {
		assertNotSame(rabbit,rabbit2);
	}

}
